<template>
  <div class="col-md-5 el-col-md-offset-7 log_main">
    <span class="log_span">欢迎使用ZTY智能检测平台</span>
    <span class="log_hint">Welcome to ZTY AI Platform</span>
    <div class="login_box">
      <el-tabs v-model="activeName">
        <el-tab-pane label="医生入口" name="first">
          <DoctorLogin></DoctorLogin>
        </el-tab-pane>
        <el-tab-pane label="普通用户入口" name="second">
          <PatientLogin></PatientLogin>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import Copyright from "@/components/copyright";
import DoctorLogin from "@/components/DoctorLogin";
import PatientLogin from "@/components/PatientLogin";
export default {
  name: "Login",
  components: {PatientLogin, DoctorLogin, Copyright},
  data() {
    return {
      defaultHeight: {
        height: ""
      },
      activeName: 'first',
    };
  },
  methods: {
    //定义方法，获取高度减去头尾
    getHeight() {
      this.defaultHeight.height = window.innerHeight - 120 + "px";
    }
  },

  created() {
    //页面创建时执行一次getHeight进行赋值，顺道绑定resize事件
    window.addEventListener("resize", this.getHeight);
    this.getHeight();
  }
}
</script>

<style scoped>
  * {
    padding: 0;
    margin: 0;
  }
  .el-header, .el-footer {
    background-color: #E4ECFC;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  .el-main {
    color: #333;
    text-align: center;
    line-height: 160px;
  }
  .log_main {
    line-height: 20px;
    background-color: white;
    border-radius: 5px;
    margin-top: 3%;
    height: 610px;
    margin-left: 30%;
    box-shadow: 0 0 2.1875rem 0 rgba(154,161,171,0.15);
    text-align: center;
  }
  .login_ {
    background-color: #E4ECFC;
    height: 100%;
    width: 100%;
    border-radius: 0;
  }
  .login_box {
    /*background-color: lavenderblush;*/
    width: 82%;
    height: 74%;
    margin: 0 auto;
    margin-top: 3%;
  }
  .log_span {
    display: block;
    /*background-color: lavenderblush;*/
    height: 24px;
    line-height: 24px;
    margin-top: 10%;
    font-weight: 600;
    letter-spacing: 1px;
    color: black;
  }
  .log_hint {
    display: block;
    margin-top: 3px;
    /*background-color: lavender;*/
    font-size: 12px;
    line-height: 16px;
    height: 16px;
    font-weight: 300;
  }
  ::v-deep .el-tabs__content {
    overflow: visible;
  }
  ::v-deep .el-tabs__item {
    color: #333333;
    letter-spacing: 1px;
    font-family: "Microsoft YaHei";
  }
  ::v-deep .el-tabs__item.is-active {
    color: #1362FC;
  }
  ::v-deep .el-icon-arrow-left {
    color: #333333;
  }
  ::v-deep .el-icon-arrow-right {
    color: #333333;
  }
  ::v-deep .el-tabs__nav-wrap::after {
    height: 0;
  }
  ::v-deep .el-tabs__active-bar {
    background-color: #1362FC;
  }
</style>